#define __TG_c

#include "includeAll.h"



void TG()
{
    
       if(bTG)
	   {
		   
	   
			if(bSecFlash500ms)
			{
				F_clrLed;
			}
			else
			{
				F_setLed;
			}
        if(D_TG)
		{
			
			bPeople=1;
			F_clrPowerL;
//			F_clrPowerH;
			time1m=6;
		}
		else
		{
			if(time1m==0)
			{
				PowerSet();
				bPeople=0;
				F_setLed;
			}
			
		}
      
	   }
	   else
	   {
		 bPeople=0;
		   F_setLed;
	   }
	
}

